package de.andreavicentini.teatralia.generate;

import org.magiclabs.htmlx.*;
import java.util.*;
import de.andreavicentini.teatralia.pages.*;

public class Footer implements ILayout {
  protected static String nl;
  public static synchronized Footer create(String lineSeparator)
  {
    nl = lineSeparator;
    Footer result = new Footer();
    nl = null;
    return result;
  }

  public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
  protected final String TEXT_1 = "";
  protected final String TEXT_2 = NL + NL + NL + "<div class=\"footer\">" + NL + "<table width=100% border=0>" + NL + "<tr>" + NL + "\t<td>" + NL + "\t<span style=\"margin-right: 20px\">" + NL + "\t<font face=\"verdana\"><b>Teatralia</b><font color=\"gray\">Europa</font> :: <b>";
  protected final String TEXT_3 = "</b></font>" + NL + "\t</span>" + NL + "\t</td>" + NL + "" + NL + "\t<td>" + NL + "\t";
  protected final String TEXT_4 = " |" + NL + "\t";
  protected final String TEXT_5 = " |" + NL + "\t";
  protected final String TEXT_6 = " |" + NL + "\t";
  protected final String TEXT_7 = " |" + NL + "\t";
  protected final String TEXT_8 = " |" + NL + "\t";
  protected final String TEXT_9 = " |" + NL + "\t";
  protected final String TEXT_10 = NL + "\t</td>" + NL + "\t" + NL + "\t<td align=right><font size=-2>" + NL + "\t(";
  protected final String TEXT_11 = " | " + NL + "\t";
  protected final String TEXT_12 = ")" + NL + "\t</font></td>" + NL + "</tr>" + NL + "" + NL + "</table>" + NL + "</div>";
  protected final String TEXT_13 = NL;

	public String generate(Object argument)
  {
    final StringBuffer stringBuffer = new StringBuffer();
    stringBuffer.append(TEXT_1);
     Page page = (Page) argument;
TeatraliaSiteModel site = (TeatraliaSiteModel) page.getArea().getSiteModel();

    stringBuffer.append(TEXT_2);
    stringBuffer.append( page.getTitle() );
    stringBuffer.append(TEXT_3);
    stringBuffer.append( Link.to(site.home) );
    stringBuffer.append(TEXT_4);
    stringBuffer.append( Link.to(site.members) );
    stringBuffer.append(TEXT_5);
    stringBuffer.append( Link.to(site.events) );
    stringBuffer.append(TEXT_6);
    stringBuffer.append( Link.to(site.galleries) );
    stringBuffer.append(TEXT_7);
    stringBuffer.append( Link.to(site.repertoire) );
    stringBuffer.append(TEXT_8);
    stringBuffer.append( Link.to(site.contact) );
    stringBuffer.append(TEXT_9);
    stringBuffer.append( Link.to(site.links) );
    stringBuffer.append(TEXT_10);
    stringBuffer.append( new LocaleLink(page, Locale.GERMAN) );
    stringBuffer.append(TEXT_11);
    stringBuffer.append( new LocaleLink(page, Locale.ITALIAN) );
    stringBuffer.append(TEXT_12);
    stringBuffer.append(TEXT_13);
    return stringBuffer.toString();
  }
}